﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/philadmin/Philadmin.Master"
    CodeBehind="ViewNews.aspx.vb" Inherits="Phila.ViewNews" %>

<%@ Register Assembly="RadGrid.Net2" Namespace="Telerik.WebControls" TagPrefix="radG" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h1>
        View News</h1>
    <div align="center">
        <asp:Label ID="lblMsg" runat="server"></asp:Label></div>
    <radG:RadGrid ID="radGrid" runat="server" Width="99%" PageSize="20" AllowSorting="True"
        Skin="Telerik" AllowPaging="True" ShowGroupPanel="True" AutoGenerateColumns="False"
        GridLines="None" EnableAJAX="True" AllowFilteringByColumn="True">
        <PagerStyle Mode="NextPrevNumericAndAdvanced"></PagerStyle>
        <MasterTableView Width="100%" GroupLoadMode="Client" GroupsDefaultExpanded="False"
            CommandItemDisplay="Top" DataKeyNames="ID">
            <CommandItemTemplate>
                <table width="100%" border="0">
                    <tr>
                        <td valign="top" align="right">
                            <a href="EditNews.aspx">
                                <img src="../RadControls/Grid/Skins/AddRecord.gif" align="absmiddle" />Add New</a>
                        </td>
                    </tr>
                </table>
            </CommandItemTemplate>
            <RowIndicatorColumn Visible="False">
                <HeaderStyle Width="20px"></HeaderStyle>
            </RowIndicatorColumn>
            <ExpandCollapseColumn Visible="False">
                <HeaderStyle Width="19px"></HeaderStyle>
            </ExpandCollapseColumn>
            <Columns>
                <radG:GridTemplateColumn AllowFiltering="False" Groupable="false" UniqueName="TemplateEditColumn"
                    HeaderText="Edit">
                    <ItemTemplate>
                        <a href="EditNews.aspx?nid=<%#DataBinder.Eval(Container.DataItem,"ID")%>">
                            <img src="../RadControls/Grid/Skins/Edit.gif" alt="Edit" title="Edit" style="border: 0px;" />
                        </a>
                    </ItemTemplate>
                    <HeaderStyle Width="30px" />
                </radG:GridTemplateColumn>
                <radG:GridBoundColumn SortExpression="Title" HeaderText="Title" HeaderButtonType="TextButton"
                    DataField="Title">
                </radG:GridBoundColumn>
                <radG:GridCheckBoxColumn DataField="IsActive" HeaderText="IsActive" SortExpression="IsActive"
                    UniqueName="IsActive" EditFormColumnIndex="1">
                    <HeaderStyle Width="100px" />
                </radG:GridCheckBoxColumn>
                <radG:GridCheckBoxColumn DataField="IsArchive" HeaderText="IsArchive" SortExpression="IsArchive"
                    UniqueName="IsArchive" EditFormColumnIndex="1">
                    <HeaderStyle Width="100px" />
                </radG:GridCheckBoxColumn>
                <radG:GridButtonColumn UniqueName="DeleteColumn" Text="Delete" CommandName="Delete"
                    ButtonType="ImageButton" ImageUrl="../RadControls/Grid/Skins/Delete.gif" ConfirmText="Are you sure you want to delete this record?">
                    <HeaderStyle Width="30px" />
                </radG:GridButtonColumn>
            </Columns>
        </MasterTableView>
        <ClientSettings AllowGroupExpandCollapse="true" AllowDragToGroup="True">
            <Selecting AllowRowSelect="False" />
        </ClientSettings>
    </radG:RadGrid>
</asp:Content>
